/**
 * @desc 用户相关路由
 */
import express, { Request, Response } from 'express';
import { CPayListSave } from '../controller/payList';
import ErrorCode from '../utils/errorCode';
const {
  ErrorUserVotParamErr,
} = ErrorCode;

// 获取路由
const router = express.Router();

// 保存用户支付记录
router.post('/paylist/save', async (req: Request, res: Response) => {
  const { openid, passopenid, money, ticket, time, code } = req.body;
  console.log(req.body);
  console.log(openid, passopenid, money, ticket, time);
  const result: any = await CPayListSave(openid, passopenid, money, ticket, time, code) as any;
  res.json(result);
});

export default router;